﻿using System;
using Volo.Abp.Domain.Entities.Auditing;
using YaAppoint.DapperRepositories;

namespace YaAppoint.CustomSettings
{
    /// <summary>
    /// 科室设备类型预约设置
    /// </summary>
    public class CustomSetting:FullAuditedEntity<Guid>
    {
        public virtual SettingLevel Level { get;set; }

        public virtual Guid? DepartmentId { get; set; }

        public virtual Guid? DeviceTypeId { get; set; }

        public virtual Guid? DeviceId { get; set; }

        /// <summary>
        /// 最多可往后预约天数
        /// </summary>
        public virtual int? AppointableCount { get; set; }

        /// <summary>
        /// 自动预约可预约天数
        /// 超过天数则自动预约失败
        /// </summary>
        public virtual int? AutoAppointableCount { get; set; } = 3;

        /// <summary>
        /// 可提前签到分钟数
        /// </summary>
        public virtual int? Earliest { get; set; }

        /// <summary>
        /// 到诊模式
        /// 0 自动到诊  1、自动到诊
        /// </summary>
        public virtual CheckInMode? CheckInMode { get; set; }

        /// <summary>
        /// 最晚提前预约时间 (分钟)
        /// </summary>
        public virtual int? LatestAppoint { get; set; }

        /// <summary>
        /// His预约页面的号段长度
        /// </summary>
        public virtual HisIntervalSpan? HisIntervalSpan { get; set; } = 0;

        /// <summary>
        /// 是否取自动消未付款的预约（指定时间内）
        /// </summary>
        public virtual bool? UnpaidWillBeCancel { get; set; } = null;

        /// <summary>
        /// 未付款预约取消时间 (单位：小时 h)
        /// </summary>
        public virtual int? UnpaidTimeLimit { get; set; }
     
    }
}
